//
//  ViewController.m
//  baseVideoTest
//
//  Created by 3tee on 2021/3/2.
//  Copyright © 2021年 3tee. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@property (nonatomic, strong) UITextView *sdkTxt;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor clearColor];
    self.sdkTxt = [[UITextView alloc]initWithFrame:[UIScreen mainScreen].bounds];
//    [self.view addSubview:self.sdkTxt];
    NSString *filePath = [[NSUserDefaults standardUserDefaults] objectForKey:@"sdklog"];
    NSString *content = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:NULL];
    self.sdkTxt.text = content;
    UIButton *closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    closeBtn.frame = CGRectMake(20,120, 69,50);
    [closeBtn setTitle:@"关闭" forState:UIControlStateNormal];
    closeBtn.backgroundColor = [UIColor redColor];
    closeBtn.alpha = 0.6;
    [closeBtn addTarget:self action:@selector(closeSDKLog) forControlEvents:UIControlEventTouchUpInside];
//    [self.view addSubview:closeBtn];
}

- (void)closeSDKLog{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
